{% extends base %}

{% block head %}
<style type="text/css">
label {
    float: left;
    width: 80px;
    display: block;
}
.label-rest {
    float: left;
    width: calc(100% - 80px);
}
</style>
{% end %}

{% block body %}

{% init type = "md" %}
<div class="card">
    <h3>{{T("创建笔记")}}</h3>
    <form method="POST" action="">
        <div class="row top-offset-1">
            <label>{{T("标题")}}</label> 
            <input type="text" class="mid-text" name="name" value="{{name}}" style="width:200px;"/>
        </div>
        
        <div class="row top-offset-1">
            <label>{{T("类型")}}</label>
            <select name="type" value="{{type}}">
                <option value="md">Markdown</option>
                <option value="html">富文本</option>
                <option value="csv">表格</option>
                <option value="gallery">相册</option>
                <option value="list">清单</option>
            </select>
        </div>

        <div class="row top-offset-1">
            <label>{{T("笔记本")}}</label>
            <select name="parent_id">
                {%for item in groups %}
                    <option value="{{item.id}}" {%if str(item.id)==str(parent_id)%} selected {%end%}>{{item.name}}</option>
                {% end %}
            </select>
        </div>
        <div class="row top-offset-1">
            <label>&nbsp;</label>
            <button class="mid-text">{{T("添加")}}</button>
        </div>
    </form>
</div>
{% end %}

{% block aside %}
    {% include note/mod_aside.html %}
{% end %}
